Allow deleting suspended objects #937
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reorders the object suspended check in all the reconcilers to allow
deletion of objects when they are suspended. Objects used to get stuck
on delete because the finalizers were not getting removed due to the
suspended state.
Add setters and getters for
spec.suspend
andstatus.artifact
ininternal/object
package.This is needed for writing generic tests for any source kind.
Adds a generic test for all the reconcilers to check if a suspended
source object can be delete.
Some observations related to the metrics:
When a suspended object is created, finalizer is set and status.observedGeneration remains in -1.
With prometheus query
gotk_reconcile_condition{kind=~"GitRepository",name="podinfo3"}==1
, following are the observed metrics:status=Ready when the object is suspended again, same as above.
status=Deleted when the suspended object is deleted
Fixes #934